package API.DAY2;

public class ReplaceAllDemo {
    public static void main(String[] args) {
        String a = "abcd1234dfafa3434kdjfdas";
        a=a.replaceAll("[0-9]+","-NUMBER-");
        System.out.println(a);

        String b = "(abc|bcd|123)";
        String c = "abc,bcd,efg,123,456,789";
        c=c.replaceAll(b,"***");
        System.out.println(c);


    }
}
